home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1999 December
/
PCWorld_1999-12_cd.bin
/
Software
/
Servis
/
UrthMDB
/
Codegen
/
UMCG Design Notes.ht_
/
UMCG Design Notes.ht
Wrap
Text File
|
1999-10-03
|
16KB
|
352 lines
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>Urthman's MDB Code Generator Design Notes</title>
</head>
<body bgcolor="#A3CDDA">
<div align="center"><center>
<table border="1" cellpadding="8" cellspacing="0" width="100%"
bgcolor="#5A8BAB">
<tr>
<td align="center" width="100%"><font color="#FFFF00"
size="6" face="Arial"><em><strong>Urthman's MDB Code
Generator.</strong></em></font></td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="0" cellpadding="8" cellspacing="8" width="100%">
<tr>
<td align="center"><font size="5" face="Arial"><strong>Design
Notes:</strong></font></td>
</tr>
<tr>
<td><ol>
<li><a href="#Answers"><font size="3" face="Arial"><strong>Common
Answers</strong></font></a></li>
<li><a href="#Notes"><font size="3" face="Arial"><strong>Design
Notes</strong></font></a></li>
<li><a href="#Features"><font size="3" face="Arial"><strong>New
Features</strong></font></a></li>
</ol>
</td>
</tr>
<tr>
<td><font size="2" face="Arial">This section is designed
to provide additional information that has popped up in
various email messages from both registered and
unregistered users. I certainly appreciate all of the
feedback.</font></td>
</tr>
</table>
</center></div>
<hr>
<div align="center"><center>
<table border="0" cellpadding="8" cellspacing="8" width="100%">
<tr>
<td><a name="Answers"><font size="4" face="Arial"><strong>Common
Answers:</strong></font></a></td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>1. Development
platform:</strong> The program has been tested both
extensively and successfully on Windows 95, Windows 98
and WIndows NT v4.0, with both MS Office 95 and 97. The
development platform of choice is Visual Basic v5.0
Professional Edition with Service Pack 3.</font></td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>2. MS Jet 3.5x
compatibility issue:</strong> Earliest releases of the
MDB Code Generator were built with reference to the
Microsoft DAO 3.51 Library. These early releases were
also scaled down packages for size with the mistaken
assumption that everyone using this program has both
Microsoft Visual Basic v5.0 with Service Pack 3 and a
version of Microsoft Access 95 or 97 with all of the
available updates.</font><p><font size="2" face="Arial">This
current release is distributed with a more complete
package including all of the latest MS Jet components
necessary and available at the time of release.</font></p>
<p><font size="2" face="Arial"><strong>Most recently</strong>,
an Internet security issue has arisen dealing with the
ODBC component included with this software package.
Although this software doesn't use ODBC, the component
has been updated to the preferred version for MS Jet
v4.0.</font></p>
</td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>3. Visual Basic
Versions:</strong> Visual Basic v6.0 users will most
likely require the Visual Basic v5.0 runtimes. No one has
reported trying out the code modules generated by our
software with VB4 projects.</font></td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>4. Installation
Problems:</strong> This program's installer is a slightly
modified version of the native installer included with
the Visual Basic 5.0 Professional Edition. Refer to the
"Code Chunks" section of our web site for
references to this "slight modification". Much
greater control over the programs installation was
established using the Urthman's Setup LST Editor also
available at our web site.</font></td>
</tr>
</table>
</center></div>
<hr>
<div align="center"><center>
<table border="0" cellpadding="8" cellspacing="8" width="100%">
<tr>
<td><a name="Notes"><font size="4" face="Arial"><strong>Design
Notes:</strong></font></a></td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>1. Dynamic
Database Creation:</strong> The code generator
table-create function has been moved into the routine
that opens the table within the database. This allows for
upgradable code utilizing the original (existing)
database:</font><p><font size="2" face="Arial">When a
database is accessed for the first time, it is the result
of a call to access a table within that database. If the
database file does not exist, then the database file is
created, and since the table being accessed also doesn't
exist, then that table is also created with all of it's
fields and indexes from the original snapshot database
from which the code module was generated.</font></p>
<p><font size="2" face="Arial">Under this strategy, any
table that is never accessed would never be created, and
any subsequent upgrades that use additional tables can
then be dropped onto the original database and the
additional tables will be created within that database
without the need to upgrade or otherwise convert the
original data.</font></p>
</td>
</tr>
<tr>
<td><font color="#000000" size="2" face="Arial"><strong>2.
Maintaining synchronization with multiple keys:</strong>
When non-primary keys exist (in addition to the primary),
the save and record delete routines will restore the
primary key to do the necessary validation-search prior
to the actual function of the respective routines.
Immediately following the save or delete, the original
key which was active prior to the function of the
subroutine is again restored, and the file
re-synchronized with that key/index based on the key
value of the same or next higher record. If this
same-or-next-higher record is not a valid record, the
same-or-next-lower record is found.</font></td>
</tr>
<tr>
<td><font color="#000000" size="2" face="Arial"><strong>3.
Find function extensions:</strong> The "Find
Extensions" can be used as an alternative to the
"Next" and "Previous" function and as
a recovery from a failed "Find" operation.
Where the standard "Find" or "By"
routines search for a record that matches the search
criteria ("="), the FindNX and FindPV search
for the next higher or next lower record, which allows
for a much looser criteria.</font><p><font
color="#000000" size="2" face="Arial">For example, given
a "Find" (or "By") operation to seek
a specific criteria; if the search fails, you might want
to look for the record immediately above or below that
record rather than leave the database without a current
record. A standard Next or Previous may not provide the
record immediately above or below the failed search.</font></p>
</td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>4. File Type
Registration:</strong> In the advanced options of the
registered version, there is an option to include a
registry entry which adds a file association and
corresponding Windows Explorer file menu function. This
means that you can use Windows Explorer to locate your
MDB files, right-click on them and select VB Code
Generator from the pop up menu. The code generator is
started with that database loaded and ready to generate
(or re-generate) code.</font></td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>5. Improved
Project Management:</strong> In the original release,
registered versions of the program would build and
maintain a project listing allowing the user to select a
previously generated database definition and pop the code
out with all of the selected tables and database specific
options already in place. This is great for when you need
to redesign the database and table layouts.</font><p><font
size="2" face="Arial">The new release manages this data
in separate configuration files which can then be copied
for backup or deleted individually.</font></p>
</td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>6. Table Field
Verification:</strong> As a natural extension of table
creation "on-the-fly -- if-and-when needed", a
table field verification subroutine has been added to the
extensive code generated by this program. In the event
that your program must be upgraded to include additional
fields in a given table, rather than having to require
your end user dump or convert their original database,
this feature can jump into a field verification routine
that will create the additional fields in the database
table.</font><p><font size="2" face="Arial"><strong>However:</strong>
Specific changes in the index structure and modifications
for field sizes are not available at this time. Also,
deleted fields will merely be ignored. If a discontinued
field is either "Required" or does not
"Allow Zero Length", saving new records will
result in an error.</font></p>
</td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>7. Read-Write
Permissions:</strong> Another natural extension of an
existing feature has been added to the code generator
arsenal. In the advanced options, there is a selection
for how you want your program to address security: either
by the default "admin" with no password for all
users; or with a user name and (optional) password that
your program will pass along into the code module.</font><p><font
size="2" face="Arial">When the user name and (optional)
password is controlled by your program, the <strong>save</strong>
and <strong>kill</strong> subroutines are changed to a
"<em><strong>Function As Boolean</strong></em>"
routine, returning a True or False to indicate whether
the operation was successful or not. If the designated
user does not have write permissions, the <strong>save</strong>
and <strong>kill</strong> operations will return a <em>False</em>,
and if the operation was successful, the operation
returns a <em>True</em>.</font></p>
</td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>8. Find
Extensions:</strong> These find extensions no longer have
an option for passing parameters. Instead, the Find and
By routines will leave the index field variables
populated with the initial parameters if the find
operation fails. Thus, you don't need to worry about the
parameters or field data after a failed Find<strong>:</strong></font><div
align="center"><center><table border="0" cellpadding="8"
cellspacing="4" width="100%">
<tr>
<td bgcolor="#FFFFFF"><blockquote>
<p><font size="2" face="Arial"><strong>call
mdbMyData.MyTableFind(Data1, Data2,
vbNullString)<br>
if mdbMyDate.MyTableERR Then call
mdbMyData.MyTableFindNX</strong></font></p>
</blockquote>
</td>
</tr>
</table>
</center></div></td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>9. IsKey
function:</strong> This function returns a True if the
current index is the Primary Key, otherwise returns a
False.</font></td>
</tr>
</table>
</center></div>
<hr>
<div align="center"><center>
<table border="0" cellpadding="8" cellspacing="8" width="100%">
<tr>
<td><a name="Features"><font size="4" face="Arial"><strong>New
Features:</strong></font></a></td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>1. Multiple Code
Modules:</strong> This feature was added to allow
multiple code modules to be created for the purpose of
building large data processing software that requires
multiple databases for handling large numbers of records.
The additional code modules refer to the table data in
the original code module, and contain little more than
the routines for initializing (and creating) the database
and tables, and writing records to those tables.</font></td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>2. Updated data
type support:</strong> We have added the Currency data
type to our list of supported data types. Previously, the
Currency data type was converted to the Double data type.
This has been corrected.</font></td>
</tr>
<tr>
<td><font size="2" face="Arial"><strong>3. Modifications
for support of the Urthman's MDB Construction Kit:</strong>
The Urthman's MDB Code Generator has an add-on program
whose function is to provide a means for the quick and
effective creation of MS Access databases and tables, as
well as the generation of a code module for exchanging
data between your MS Access tables and ASCII text files.
See the Urthman's MDB Construction Kit on our web site.</font></td>
</tr>
</table>
</center></div>
<hr>
<div align="center"><center>
<table border="0" cellpadding="8" cellspacing="0" width="100%">
<tr>
<td align="center" width="33%"><div align="center"><center><table
border="0" cellpadding="8" cellspacing="0"
bgcolor="#C0C0C0">
<tr>
<td align="right" valign="top"><font
color="#000000" size="1" face="Arial"><strong>Contact:</strong></font></td>
<td valign="top"><font color="#000000" size="1"
face="Arial"><strong>John Stanley Enterprises</strong><br>
PO Box 1672<br>
Valrico, FL 33595-1672</font></td>
</tr>
<tr>
<td align="right" valign="top"><font size="1"
face="Arial"><strong>URL:</strong></font></td>
<td><a href="http://www.a-znet.com/jse/"><font
size="1" face="Arial"><strong>http://www.a-znet.com/jse/</strong></font></a></td>
</tr>
<tr>
<td align="right" valign="top"><font
color="#000000" size="1" face="Arial"><strong>Email:</strong></font></td>
<td valign="top"><a href="mailto:urthman@usa.net"><font
color="#000000" size="1" face="Arial"><strong>urthman@usa.net</strong></font></a><font
color="#000000" size="1" face="Arial"><strong> </strong></font></td>
</tr>
</table>
</center></div></td>
<td align="center" width="33%"><font face="Arial"></font> </td>
<td align="center" width="33%"><font size="1"
face="Arial">Microsoft, Windows, NT and Visual Basic are
registered trademarks of the Microsoft Corporation.</font></td>
</tr>
</table>
</center></div>
</body>
</html>